package nc.bs.moq.hf022510;

import java.util.Collection;

import nc.bs.medpub.pub.MedQueryDMO;
import nc.itf.moq.pub.constant.IMoqBilltypeCons;
import nc.vo.jcom.lang.StringUtil;
import nc.vo.moq.hf021505.SyqyVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.CircularlyAccessibleValueObject;

public class MoqCheckReportDMO extends MedQueryDMO {

	public CircularlyAccessibleValueObject[] queryAllHeadData(String whereString)
			throws BusinessException {

		String strWhere = " nvl(dr,0)=0 ";
		if (!StringUtil.isEmptyWithTrim(whereString)) {
			strWhere += " and (" + whereString + ")";
		}
		Collection rs = getDao().retrieveByClause(SyqyVO.class, strWhere);
		if (rs != null && !rs.isEmpty()) {
			return (SyqyVO[]) rs.toArray(new SyqyVO[0]);
		}
		return null;
	}

	@Override
	protected String getBillType() {
		return IMoqBilltypeCons.sygl_syqy;
	}

	@Override
	protected Class<?> getBodyVOClass() throws BusinessException {
		return SyqyVO.class;
	}

	@Override
	protected Class<?> getHeadVOClass() throws BusinessException {
		return SyqyVO.class;
	}

	public CircularlyAccessibleValueObject[] queryAllBodyData(String key)
			throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}

	public CircularlyAccessibleValueObject[] queryAllBodyData(String key,
			String whereString) throws BusinessException {
		// TODO Auto-generated method stub
		return null;
	}
}
